#include <stdio.h>
const int DEMENSION = 3;

int main(void)
{
	
	int i = 0, y1[DEMENSION], y2[DEMENSION], subResult, result = 0;
	
	for( i; i<DEMENSION; i++)
	{
		printf("Bitte %d. Komponente vom 1. Vektor eingeben\n",(i+1));
		scanf("%d", &y1[i]);
	}
	i = 0;
	 for( i; i<DEMENSION; i++)
        {
                printf("Bitte %d. Komponente vom 2. Vektor eingeben\n",(i+1));
                scanf("%d", &y2[i]);
        }

	i = 0;	

	for( i; i < DEMENSION; i++)
	{
		subResult = y1[i] - y2[i];
		subResult = subResult * subResult;
		result = result + subResult; 
	}
	printf("result: %d\n",result);

}
